3.129 \(\int \frac{d+e x^2+f x^4+g x^6}{x^2 \left (a+b x^2+c x^4\right )^2} \, dx\)

Optimal. Leaf size=460 \[ -\frac{x \left (a \left (-2 a^2 g+\frac{b^3 d}{a}+a (b f+2 c e)-b (b e+3 c d)\right )+x^2 \left (-a b (a g+c e)-2 a c (c d-a f)+b^2 c d\right )\right )}{2 a^2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{4 a^2 c (a g+3 c e)-a b^2 (c e-a g)-4 a b c (a f+4 c d)+3 b^3 c d}{\sqrt{b^2-4 a c}}-a b (a g+c e)-2 a c (5 c d-a f)+3 b^2 c d\right )}{2 \sqrt{2} a^2 \sqrt{c} \left (b^2-4 a c\right ) \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{4 a^2 c (a g+3 c e)-a b^2 (c e-a g)-4 a b c (a f+4 c d)+3 b^3 c d}{\sqrt{b^2-4 a c}}-a b (a g+c e)-2 a c (5 c d-a f)+3 b^2 c d\right )}{2 \sqrt{2} a^2 \sqrt{c} \left (b^2-4 a c\right ) \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{d}{a^2 x} \]

[Out]

-(d/(a^2*x)) - (x*(a*((b^3*d)/a - b*(3*c*d + b*e) + a*(2*c*e + b*f) - 2*a^2*g) +
 (b^2*c*d - 2*a*c*(c*d - a*f) - a*b*(c*e + a*g))*x^2))/(2*a^2*(b^2 - 4*a*c)*(a +
 b*x^2 + c*x^4)) - ((3*b^2*c*d - 2*a*c*(5*c*d - a*f) - a*b*(c*e + a*g) + (3*b^3*
c*d - 4*a*b*c*(4*c*d + a*f) - a*b^2*(c*e - a*g) + 4*a^2*c*(3*c*e + a*g))/Sqrt[b^
2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(2*Sqrt[2]*
a^2*Sqrt[c]*(b^2 - 4*a*c)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - ((3*b^2*c*d - 2*a*c*(5*
c*d - a*f) - a*b*(c*e + a*g) - (3*b^3*c*d - 4*a*b*c*(4*c*d + a*f) - a*b^2*(c*e -
 a*g) + 4*a^2*c*(3*c*e + a*g))/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqr
t[b + Sqrt[b^2 - 4*a*c]]])/(2*Sqrt[2]*a^2*Sqrt[c]*(b^2 - 4*a*c)*Sqrt[b + Sqrt[b^
2 - 4*a*c]])

_______________________________________________________________________________________

Rubi [A]  time = 8.15688, antiderivative size = 460, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.114 \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{4 a^2 c (a g+3 c e)-a b^2 (c e-a g)-4 a b c (a f+4 c d)+3 b^3 c d}{\sqrt{b^2-4 a c}}-a b (a g+c e)-2 a c (5 c d-a f)+3 b^2 c d\right )}{2 \sqrt{2} a^2 \sqrt{c} \left (b^2-4 a c\right ) \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{4 a^2 c (a g+3 c e)-a b^2 (c e-a g)-4 a b c (a f+4 c d)+3 b^3 c d}{\sqrt{b^2-4 a c}}-a b (a g+c e)-2 a c (5 c d-a f)+3 b^2 c d\right )}{2 \sqrt{2} a^2 \sqrt{c} \left (b^2-4 a c\right ) \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{d}{a^2 x}-\frac{x \left (-2 a^3 g+a^2 (b f+2 c e)+x^2 \left (-a b (a g+c e)-2 a c (c d-a f)+b^2 c d\right )-a b (b e+3 c d)+b^3 d\right )}{2 a^2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x^2 + f*x^4 + g*x^6)/(x^2*(a + b*x^2 + c*x^4)^2),x]

[Out]

-(d/(a^2*x)) - (x*(b^3*d - a*b*(3*c*d + b*e) + a^2*(2*c*e + b*f) - 2*a^3*g + (b^
2*c*d - 2*a*c*(c*d - a*f) - a*b*(c*e + a*g))*x^2))/(2*a^2*(b^2 - 4*a*c)*(a + b*x
^2 + c*x^4)) - ((3*b^2*c*d - 2*a*c*(5*c*d - a*f) - a*b*(c*e + a*g) + (3*b^3*c*d
- 4*a*b*c*(4*c*d + a*f) - a*b^2*(c*e - a*g) + 4*a^2*c*(3*c*e + a*g))/Sqrt[b^2 -
4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(2*Sqrt[2]*a^2*
Sqrt[c]*(b^2 - 4*a*c)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - ((3*b^2*c*d - 2*a*c*(5*c*d
- a*f) - a*b*(c*e + a*g) - (3*b^3*c*d - 4*a*b*c*(4*c*d + a*f) - a*b^2*(c*e - a*g
) + 4*a^2*c*(3*c*e + a*g))/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b
+ Sqrt[b^2 - 4*a*c]]])/(2*Sqrt[2]*a^2*Sqrt[c]*(b^2 - 4*a*c)*Sqrt[b + Sqrt[b^2 -
4*a*c]])

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((g*x**6+f*x**4+e*x**2+d)/x**2/(c*x**4+b*x**2+a)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [A]  time = 5.95702, size = 529, normalized size = 1.15 \[ -\frac{-\frac{2 x \left (2 a \left (a^2 g-a c \left (e+f x^2\right )+c^2 d x^2\right )+b^2 \left (a e-c d x^2\right )+a b \left (-a f+a g x^2+3 c d+c e x^2\right )+b^3 (-d)\right )}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (2 a c \left (2 a^2 g-5 c d \sqrt{b^2-4 a c}+a f \sqrt{b^2-4 a c}+6 a c e\right )+b^2 \left (a^2 g+3 c d \sqrt{b^2-4 a c}-a c e\right )-a b \left (c e \sqrt{b^2-4 a c}+a g \sqrt{b^2-4 a c}+4 a c f+16 c^2 d\right )+3 b^3 c d\right )}{\sqrt{c} \left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-2 a c \left (2 a^2 g+5 c d \sqrt{b^2-4 a c}-a f \sqrt{b^2-4 a c}+6 a c e\right )+b^2 \left (a^2 (-g)+3 c d \sqrt{b^2-4 a c}+a c e\right )+a b \left (-c e \sqrt{b^2-4 a c}-a g \sqrt{b^2-4 a c}+4 a c f+16 c^2 d\right )-3 b^3 c d\right )}{\sqrt{c} \left (b^2-4 a c\right )^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{4 d}{x}}{4 a^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(d + e*x^2 + f*x^4 + g*x^6)/(x^2*(a + b*x^2 + c*x^4)^2),x]

[Out]

-((4*d)/x - (2*x*(-(b^3*d) + b^2*(a*e - c*d*x^2) + a*b*(3*c*d - a*f + c*e*x^2 +
a*g*x^2) + 2*a*(a^2*g + c^2*d*x^2 - a*c*(e + f*x^2))))/((b^2 - 4*a*c)*(a + b*x^2
 + c*x^4)) + (Sqrt[2]*(3*b^3*c*d + b^2*(3*c*Sqrt[b^2 - 4*a*c]*d - a*c*e + a^2*g)
 + 2*a*c*(-5*c*Sqrt[b^2 - 4*a*c]*d + 6*a*c*e + a*Sqrt[b^2 - 4*a*c]*f + 2*a^2*g)
- a*b*(16*c^2*d + c*Sqrt[b^2 - 4*a*c]*e + 4*a*c*f + a*Sqrt[b^2 - 4*a*c]*g))*ArcT
an[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[c]*(b^2 - 4*a*c)^(3/2
)*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + (Sqrt[2]*(-3*b^3*c*d + b^2*(3*c*Sqrt[b^2 - 4*a*
c]*d + a*c*e - a^2*g) - 2*a*c*(5*c*Sqrt[b^2 - 4*a*c]*d + 6*a*c*e - a*Sqrt[b^2 -
4*a*c]*f + 2*a^2*g) + a*b*(16*c^2*d - c*Sqrt[b^2 - 4*a*c]*e + 4*a*c*f - a*Sqrt[b
^2 - 4*a*c]*g))*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[c
]*(b^2 - 4*a*c)^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]))/(4*a^2)

_______________________________________________________________________________________

Maple [B]  time = 0.092, size = 6807, normalized size = 14.8 \[ \text{output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((g*x^6+f*x^4+e*x^2+d)/x^2/(c*x^4+b*x^2+a)^2,x)

[Out]

result too large to display

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \frac{{\left (a b c e - 2 \, a^{2} c f + a^{2} b g -{\left (3 \, b^{2} c - 10 \, a c^{2}\right )} d\right )} x^{4} -{\left (a^{2} b f - 2 \, a^{3} g +{\left (3 \, b^{3} - 11 \, a b c\right )} d -{\left (a b^{2} - 2 \, a^{2} c\right )} e\right )} x^{2} - 2 \,{\left (a b^{2} - 4 \, a^{2} c\right )} d}{2 \,{\left ({\left (a^{2} b^{2} c - 4 \, a^{3} c^{2}\right )} x^{5} +{\left (a^{2} b^{3} - 4 \, a^{3} b c\right )} x^{3} +{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} x\right )}} + \frac{\int \frac{a^{2} b f - 2 \, a^{3} g +{\left (a b c e - 2 \, a^{2} c f + a^{2} b g -{\left (3 \, b^{2} c - 10 \, a c^{2}\right )} d\right )} x^{2} -{\left (3 \, b^{3} - 13 \, a b c\right )} d +{\left (a b^{2} - 6 \, a^{2} c\right )} e}{c x^{4} + b x^{2} + a}\,{d x}}{2 \,{\left (a^{2} b^{2} - 4 \, a^{3} c\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x^6 + f*x^4 + e*x^2 + d)/((c*x^4 + b*x^2 + a)^2*x^2),x, algorithm="maxima")

[Out]

1/2*((a*b*c*e - 2*a^2*c*f + a^2*b*g - (3*b^2*c - 10*a*c^2)*d)*x^4 - (a^2*b*f - 2
*a^3*g + (3*b^3 - 11*a*b*c)*d - (a*b^2 - 2*a^2*c)*e)*x^2 - 2*(a*b^2 - 4*a^2*c)*d
)/((a^2*b^2*c - 4*a^3*c^2)*x^5 + (a^2*b^3 - 4*a^3*b*c)*x^3 + (a^3*b^2 - 4*a^4*c)
*x) + 1/2*integrate((a^2*b*f - 2*a^3*g + (a*b*c*e - 2*a^2*c*f + a^2*b*g - (3*b^2
*c - 10*a*c^2)*d)*x^2 - (3*b^3 - 13*a*b*c)*d + (a*b^2 - 6*a^2*c)*e)/(c*x^4 + b*x
^2 + a), x)/(a^2*b^2 - 4*a^3*c)

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x^6 + f*x^4 + e*x^2 + d)/((c*x^4 + b*x^2 + a)^2*x^2),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x**6+f*x**4+e*x**2+d)/x**2/(c*x**4+b*x**2+a)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x^6 + f*x^4 + e*x^2 + d)/((c*x^4 + b*x^2 + a)^2*x^2),x, algorithm="giac")

[Out]

Exception raised: TypeError